home *** CD-ROM | disk | FTP | other *** search
- erved.
- *
- * YOUR RIGHTS WITH RESPECT TO THIS SOFTWARE IS GOVERNED BY THE
- * TERMS AND CONDITIONS SET FORTH IN THE CORRESPONDING EULA.
- *
- **
- --->
-
- <!--- Simple text box control --->
-
- <cfif not isDefined("attributes.name")>
- <cfthrow message="form:textbox: Must befine name attribute.">
- </cfif>
-
- <cfparam name="attributes.defaultValue" default="">
-
- <!---
- Simple logic - if form.NAME exists, we must have
- submitted the form - so use that value, otherwise
- use the optional defaultValue parameter
- --->
- <cfif isDefined("form.#attributes.name#")>
- <cfset value = form[attributes.name]>
- <cfelse>
- <cfset value = attributes.defaultValue>
- </cfif>
-
- <!--- render control --->
- <cfoutput><input type="text" name="#attributes.name#" value="#value#"</cfoutput>
-
- <!--- Every other argument is optional, so we can just dump it on --->
- <cfloop item="arg" collection="#attributes#">
- <cfif arg is not "name" and arg is not "defaultValue">
- <cfoutput> #arg#="#attributes[arg]#"</cfoutput>
- </cfif>
- </cfloop>
-
- <cfoutput>></cfoutput>
- <cfsetting enableCFOutputOnly=0><!---
- **
- * CFMX Example Applications
- *
- * Copyright (c) 2002 Macromedia. All Rights Rese